// 预加载脚本
console.log('预加载脚本');
const { contextBridge,ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld('myAPI', {
  versions: process.versions,
  saveFile: (content) => {
    ipcRenderer.send('save-file', content);
  },
  readFile: () => {
    return ipcRenderer.invoke('read-file');
  }
});


